package com.lingz.manager.modules.wuxue.controller;


import com.lingz.manager.common.utils.ResultUtil;
import com.lingz.manager.common.vo.Result;
import com.lingz.manager.modules.wuxue.entity.HtjrDeviceInfo;
import com.lingz.manager.modules.wuxue.entity.WaterDeviceInfo;
import com.lingz.manager.modules.wuxue.service.HtjrDeviceInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * (HdjrDeviceInfo)表控制层
 *
 * @author makejava
 * @since 2023-12-14 17:09:39
 */
@RestController
@RequestMapping("htjrDeviceInfo")
@Api(description = "汉唐匠人设备元信息管理接口")
public class HtjrDeviceInfoController{
    @Autowired
    HtjrDeviceInfoService htjrDeviceInfoService;

    @GetMapping(value = "/requestHtjrDeviceInfoDataToDB")
    @ApiOperation(value = "requestHtjrDeviceInfoDataToDB")
    public Result<Object> requestHtjrDeviceInfoDataToDB(){
        htjrDeviceInfoService.requestHtjrDeviceInfoDataToDB();
        return new ResultUtil<>().setData("同步成功！");
    }

    @GetMapping("/findHtjrDeviceInfoList")
    @ApiOperation("不分页查询汉唐匠人设备数据")
    public Result<List<HtjrDeviceInfo>> findHtjrDeviceInfoList() {
        return new ResultUtil<List<HtjrDeviceInfo>>().setData(htjrDeviceInfoService.findHtjrDeviceInfoList());
    }
}

